package com.naiterui.ehp.ps.sms.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 短信签名表
 *
 * @author
 * @since 1.0.0
 */
@Entity
@Table(name = "sms_signature")
@DynamicUpdate(false)
public class Signature implements Serializable {

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 1445910170471635741L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Integer id;

    @Column(name = "title")
    private String title; // 签名标题(辨识用无逻辑意义)

    @Column(name = "name")
    private String name;     // 签名

    @Column(name = "montnet_business_id")
    private String montnetBusinessId;     // 梦网业务标识

    @Column(name = "cloopen_template_id")
    private String cloopenTemplateId;     // 容联通用模版id

    @Column(name = "channel_number")
    private String channelNumber; // 短信通道号(华为平台，不同类型签名对应不同通道号)

    @Column(name = "is_default", columnDefinition = "bit")
    private Byte isDefault;     // 是否默认模版(0:否；1：是)

    /**
     * 状态(0:启用，1：停用)
     */
    @Column(name = "status", columnDefinition = "bit")
    private Byte status;

    @Column(name = "created_at")
    private Date createdAt;         // 创建时间

    @Column(name = "changed_at")
    private Date changedAt;         // 修改时间

    @Column(name = "created_by")
    private String createdBy;       // 创建人

    @Column(name = "changed_by")
    private String changedBy;       // 修改人

    @Version                       // 版本
    private Integer version;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMontnetBusinessId() {
        return montnetBusinessId;
    }

    public void setMontnetBusinessId(String montnetBusinessId) {
        this.montnetBusinessId = montnetBusinessId;
    }

    public String getCloopenTemplateId() {
        return cloopenTemplateId;
    }

    public void setCloopenTemplateId(String cloopenTemplateId) {
        this.cloopenTemplateId = cloopenTemplateId;
    }

    public Byte getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Byte isDefault) {
        this.isDefault = isDefault;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getChangedBy() {
        return changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getChannelNumber() {
        return channelNumber;
    }

    public void setChannelNumber(String channelNumber) {
        this.channelNumber = channelNumber;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
